package com.zyx.concurrentdemo.c05memory;

/**
 * @author zyx
 * @since 2021/10/17 16:30
 * desc: 借助 枚举类 实现单例对象的创建
 */
public enum SingletonEnum {
    /**
     * 单例对象
     */
    INSTANCE("Singleton");

    /**
     * 初始化参数
     */
    private final String SingletonName;

    SingletonEnum(String name) {
        this.SingletonName = name;
    }

    public String getSingletonName() {
        return SingletonName;
    }

}
